package main

import "fmt"

type myStruct1 struct {
	myField int
}

func main() {
	//var value int = 2
	//var pointer *int = &value
	//fmt.Println(*pointer)
	var value myStruct1
	value.myField = 3
	pointer := &value
	fmt.Println(pointer.myField)
	appleDiscount(pointer)
	fmt.Println(value.myField)
	fmt.Println(pointer.myField)
}

func appleDiscount(s *myStruct1) {
	s.myField = 4
}
